export default {
  state: {
	screenWidth: document.documentElement.clientWidth, //屏幕宽度
	screenHeight: document.documentElement.clientHeight, //屏幕高度
  },
  mutations: {
	SET_SCREEN: (state, screen) => {
	  state.screenWidth = screen.screenWidth;
	  state.screenHeight = screen.screenHeight;
	}
  },
  actions: {
	resize({commit}) {
	  return new Promise((resolve, reject) => {
		commit("SET_SCREEN", {
		  screenWidth: document.documentElement.clientWidth, //屏幕宽度
		  screenHeight: document.documentElement.clientHeight, //屏幕高度
		});
		resolve();
	  });
	},
  }
};